import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
//富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
import router from './router'
//axios
import axios from 'axios'
import VueAxios from 'vue-axios'
import App from './App.vue'
import qs from 'qs';
Vue.prototype.$qs = qs

Vue.use(VueAxios,axios);

const mock = false;
if(mock){
  require('./mock/api');
}

axios.defaults.baseURL = 'https://www.seeumt.club';
axios.defaults.withCredentials = true
Vue.prototype.$axios = axios
// axios.defaults.baseURL = '/api';
// axios.defaults.baseURL = '/apis';
Vue.config.productionTip = false


Vue.use(ElementUI);
// Vue.use(Element, { size: 'small', zIndex: 3000 });
Vue.use(VueQuillEditor);

//修改title
router.beforeEach((to, from, next) => {
  if(to.meta.title) {
    document.title = to.meta.title
  }
  next()
})
new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
